<?php

namespace App\Http\Models\Rotation;

use Illuminate\Foundation\Http\FormRequest;

class RotationFrom extends FormRequest
{

    public function authorize() {
        return true;
    }

    public function rules() {
        return [
            'name' => 'required|max:16',
            'sort' => 'integer',
            'images' => 'required',
        ];
    }

    public function messages() {
        return [
            'name.required' => "轮播图名称不能为空",
            'name.max' => "名称不能超过16个字符",
            'images.required' => '图片不能为空',
            'sort.integer' => '请输入数字'
        ];
    }

}
